<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>LS.LS</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="icon" href="../assets/favicon.ico">
    <script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">

<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
                <h1><img src="../assets/css/logo.png" title="" width="117" height="52"></h1>
        </div>
        <div class="yui3-u-1-4 version">
            <em>API Docs for: </em>
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
                    <h2 class="off-left">APIs</h2>
                    <div id="api-tabview" class="tabview">
                        <ul class="tabs">
                            <li><a href="#api-classes">Classes</a></li>
                            <li><a href="#api-modules">Modules</a></li>
                        </ul>
                
                        <div id="api-tabview-filter">
                            <input type="search" id="api-filter" placeholder="Type to filter APIs">
                        </div>
                
                        <div id="api-tabview-panel">
                            <ul id="api-classes" class="apis classes">
                                <li><a href="../classes/LS.Animation.html">LS.Animation</a></li>
                                <li><a href="../classes/LS.Animation.Take.html">LS.Animation.Take</a></li>
                                <li><a href="../classes/LS.Animation.Track.html">LS.Animation.Track</a></li>
                                <li><a href="../classes/LS.BaseComponent.html">LS.BaseComponent</a></li>
                                <li><a href="../classes/LS.Collision.html">LS.Collision</a></li>
                                <li><a href="../classes/LS.ComponentContainer.html">LS.ComponentContainer</a></li>
                                <li><a href="../classes/LS.Components.Camera.html">LS.Components.Camera</a></li>
                                <li><a href="../classes/LS.Components.CameraController.html">LS.Components.CameraController</a></li>
                                <li><a href="../classes/LS.Components.CameraDirector.html">LS.Components.CameraDirector</a></li>
                                <li><a href="../classes/LS.Components.CameraFX.html">LS.Components.CameraFX</a></li>
                                <li><a href="../classes/LS.Components.Canvas3D.html">LS.Components.Canvas3D</a></li>
                                <li><a href="../classes/LS.Components.CustomData.html">LS.Components.CustomData</a></li>
                                <li><a href="../classes/LS.Components.FollowNode.html">LS.Components.FollowNode</a></li>
                                <li><a href="../classes/LS.Components.FrameFX.html">LS.Components.FrameFX</a></li>
                                <li><a href="../classes/LS.Components.FXGraphComponent.html">LS.Components.FXGraphComponent</a></li>
                                <li><a href="../classes/LS.Components.FXStack.html">LS.Components.FXStack</a></li>
                                <li><a href="../classes/LS.Components.GeometricPrimitive.html">LS.Components.GeometricPrimitive</a></li>
                                <li><a href="../classes/LS.Components.GraphComponent.html">LS.Components.GraphComponent</a></li>
                                <li><a href="../classes/LS.Components.Light.html">LS.Components.Light</a></li>
                                <li><a href="../classes/LS.Components.LightFX.html">LS.Components.LightFX</a></li>
                                <li><a href="../classes/LS.Components.LinesRenderer.html">LS.Components.LinesRenderer</a></li>
                                <li><a href="../classes/LS.Components.MeshRenderer.html">LS.Components.MeshRenderer</a></li>
                                <li><a href="../classes/LS.Components.NodeManipulator.html">LS.Components.NodeManipulator</a></li>
                                <li><a href="../classes/LS.Components.ParticlesEmissor.html">LS.Components.ParticlesEmissor</a></li>
                                <li><a href="../classes/LS.Components.PlayAnimation.html">LS.Components.PlayAnimation</a></li>
                                <li><a href="../classes/LS.Components.Poser.html">LS.Components.Poser</a></li>
                                <li><a href="../classes/LS.Components.RealtimeReflector.html">LS.Components.RealtimeReflector</a></li>
                                <li><a href="../classes/LS.Components.Rotator.html">LS.Components.Rotator</a></li>
                                <li><a href="../classes/LS.Components.SceneInclude.html">LS.Components.SceneInclude</a></li>
                                <li><a href="../classes/LS.Components.Script.html">LS.Components.Script</a></li>
                                <li><a href="../classes/LS.Components.SkinDeformer.html">LS.Components.SkinDeformer</a></li>
                                <li><a href="../classes/LS.Components.Skybox.html">LS.Components.Skybox</a></li>
                                <li><a href="../classes/LS.Components.Spline.html">LS.Components.Spline</a></li>
                                <li><a href="../classes/LS.Components.SVGRenderer.html">LS.Components.SVGRenderer</a></li>
                                <li><a href="../classes/LS.Components.Target.html">LS.Components.Target</a></li>
                                <li><a href="../classes/LS.Components.Transform.html">LS.Components.Transform</a></li>
                                <li><a href="../classes/LS.Components.VRCameraController.html">LS.Components.VRCameraController</a></li>
                                <li><a href="../classes/LS.CompositePattern.html">LS.CompositePattern</a></li>
                                <li><a href="../classes/LS.DebugRender.html">LS.DebugRender</a></li>
                                <li><a href="../classes/LS.Draw.html">LS.Draw</a></li>
                                <li><a href="../classes/LS.Formats.html">LS.Formats</a></li>
                                <li><a href="../classes/LS.GLSLCode.html">LS.GLSLCode</a></li>
                                <li><a href="../classes/LS.GraphCode.html">LS.GraphCode</a></li>
                                <li><a href="../classes/LS.GUI.html">LS.GUI</a></li>
                                <li><a href="../classes/LS.Input.html">LS.Input</a></li>
                                <li><a href="../classes/LS.InteractiveController.html">LS.InteractiveController</a></li>
                                <li><a href="../classes/LS.Knob.html">LS.Knob</a></li>
                                <li><a href="../classes/LS.LS.html">LS.LS</a></li>
                                <li><a href="../classes/LS.LScript.html">LS.LScript</a></li>
                                <li><a href="../classes/LS.Material.html">LS.Material</a></li>
                                <li><a href="../classes/LS.oldStandardMaterial.html">LS.oldStandardMaterial</a></li>
                                <li><a href="../classes/LS.Pack.html">LS.Pack</a></li>
                                <li><a href="../classes/LS.Particle.html">LS.Particle</a></li>
                                <li><a href="../classes/LS.Physics.html">LS.Physics</a></li>
                                <li><a href="../classes/LS.PhysicsInstance.html">LS.PhysicsInstance</a></li>
                                <li><a href="../classes/LS.Picking.html">LS.Picking</a></li>
                                <li><a href="../classes/LS.Player.html">LS.Player</a></li>
                                <li><a href="../classes/LS.Prefab.html">LS.Prefab</a></li>
                                <li><a href="../classes/LS.Project.html">LS.Project</a></li>
                                <li><a href="../classes/LS.Ray.html">LS.Ray</a></li>
                                <li><a href="../classes/LS.Renderer.html">LS.Renderer</a></li>
                                <li><a href="../classes/LS.RenderFrameContext.html">LS.RenderFrameContext</a></li>
                                <li><a href="../classes/LS.RenderInstance.html">LS.RenderInstance</a></li>
                                <li><a href="../classes/LS.RenderSettings.html">LS.RenderSettings</a></li>
                                <li><a href="../classes/LS.RenderState.html">LS.RenderState</a></li>
                                <li><a href="../classes/LS.Resource.html">LS.Resource</a></li>
                                <li><a href="../classes/LS.ResourcesManager.html">LS.ResourcesManager</a></li>
                                <li><a href="../classes/LS.Scene.html">LS.Scene</a></li>
                                <li><a href="../classes/LS.SceneNode.html">LS.SceneNode</a></li>
                                <li><a href="../classes/LS.ShaderBlock.html">LS.ShaderBlock</a></li>
                                <li><a href="../classes/LS.ShaderCode.html">LS.ShaderCode</a></li>
                                <li><a href="../classes/LS.ShaderGraph.html">LS.ShaderGraph</a></li>
                                <li><a href="../classes/LS.ShaderMaterial.html">LS.ShaderMaterial</a></li>
                                <li><a href="../classes/LS.Shaders.html">LS.Shaders</a></li>
                                <li><a href="../classes/LS.SpatialContainer.html">LS.SpatialContainer</a></li>
                                <li><a href="../classes/LS.StandardMaterial.html">LS.StandardMaterial</a></li>
                                <li><a href="../classes/LS.Tween.html">LS.Tween</a></li>
                                <li><a href="../classes/LS.UnityMaterial.html">LS.UnityMaterial</a></li>
                                <li><a href="../classes/LS.WBin.html">LS.WBin</a></li>
                                <li><a href="../classes/LSQ.html">LSQ</a></li>
                            </ul>
                
                
                            <ul id="api-modules" class="apis modules">
                                <li><a href="../modules/LS.html">LS</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="yui3-u-3-4">
                <div id="api-options">
                    Show:
                    <label for="api-show-inherited">
                        <input type="checkbox" id="api-show-inherited" checked>
                        Inherited
                    </label>
            
                    <label for="api-show-protected">
                        <input type="checkbox" id="api-show-protected">
                        Protected
                    </label>
            
                    <label for="api-show-private">
                        <input type="checkbox" id="api-show-private">
                        Private
                    </label>
                    <label for="api-show-deprecated">
                        <input type="checkbox" id="api-show-deprecated">
                        Deprecated
                    </label>
            
                </div>
            
            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
<h1>LS.LS Class</h1>
<div class="box meta">


        <div class="foundat">
            Defined in: <a href="../files/.._src_core.js.html#l15"><code>..&#x2F;src&#x2F;core.js:15</code></a>
        </div>

            Module: <a href="../modules/LS.html">LS</a>

</div>


<div class="box intro">
    <p>LS is the global scope for the global functions and containers of LiteScene</p>
<p>///@INFO: BASE</p>

</div>


<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
            <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

                <div class="index-section methods">
                    <h3>Methods</h3>

                    <ul class="index-list methods">
                            <li class="index-item method">
                                <a href="#method_clearUIds">clearUIds</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_cloneObject">cloneObject</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_extendClass">extendClass</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_generateUId">generateUId</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getClassName">getClassName</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getObjectClassName">getObjectClassName</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getObjectProperties">getObjectProperties</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getScript">getScript</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_isClassComponent">isClassComponent</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_nextFrame">nextFrame</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_registerComponent">registerComponent</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_registerMaterialClass">registerMaterialClass</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_registerResourceClass">registerResourceClass</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_replaceComponentClass">replaceComponentClass</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_reset">reset</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_safeCall">safeCall</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setInterval">setInterval</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setTimeout">setTimeout</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_sleep">sleep</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_unregisterComponent">unregisterComponent</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_validateName">validateName</a>

                            </li>
                    </ul>
                </div>

                <div class="index-section properties">
                    <h3>Properties</h3>

                    <ul class="index-list properties">
                            <li class="index-item property">
                                <a href="#property_Components">Components</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_MaterialClasses">MaterialClasses</a>

                            </li>
                    </ul>
                </div>


        </div>

            <div id="methods" class="api-class-tabpanel">
                <h2 class="off-left">Methods</h2>

<div id="method_clearUIds" class="method item">
    <h3 class="name"><code>clearUIds</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>root</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l653"><code>..&#x2F;src&#x2F;core.js:653</code></a>
        </p>



    </div>

    <div class="description">
        <p>Clears all the uids inside this object and children (it also works with serialized object)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">root</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>could be a node or an object from a node serialization</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_cloneObject" class="method item">
    <h3 class="name"><code>cloneObject</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>object</code>
                </li>
                <li class="arg">
                        <code>target=null</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l454"><code>..&#x2F;src&#x2F;core.js:454</code></a>
        </p>



    </div>

    <div class="description">
        <p>Clones an object (no matter where the object came from)</p>
<ul>
<li>It skip attributes starting with &quot;_&quot; or &quot;jQuery&quot; or functions</li>
<li>it tryes to see which is the best copy to perform</li>
<li>to the rest it applies JSON.parse( JSON.stringify ( obj ) )</li>
<li>use it carefully</li>
</ul>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">object</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>the object to clone</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">target=null</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>optional, the destination object</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>returns the cloned object (target if it is specified)</p>

            </div>
        </div>


</div>
<div id="method_extendClass" class="method item">
    <h3 class="name"><code>extendClass</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>target</code>
                </li>
                <li class="arg">
                        <code>origin</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l419"><code>..&#x2F;src&#x2F;core.js:419</code></a>
        </p>



    </div>

    <div class="description">
        <p>copy the properties (methods and properties) of origin class into target class</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">target</code>
                        <span class="type">Class</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">origin</code>
                        <span class="type">Class</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_generateUId" class="method item">
    <h3 class="name"><code>generateUId</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">String</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l72"><code>..&#x2F;src&#x2F;core.js:72</code></a>
        </p>



    </div>

    <div class="description">
        <p>Generates a UUID based in the user-agent, time, random and sequencial number. Used for Nodes and Components.</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">String</span>:
                    <p>uuid</p>

            </div>
        </div>


</div>
<div id="method_getClassName" class="method item">
    <h3 class="name"><code>getClassName</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>class</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">String</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l739"><code>..&#x2F;src&#x2F;core.js:739</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns an string with the class name</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">class</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>object</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">String</span>:
                    <p>returns the string with the name</p>

            </div>
        </div>


</div>
<div id="method_getObjectClassName" class="method item">
    <h3 class="name"><code>getObjectClassName</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>the</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">String</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l714"><code>..&#x2F;src&#x2F;core.js:714</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns an object class name (uses the constructor toString)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">the</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>object to see the class name</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">String</span>:
                    <p>returns the string with the name</p>

            </div>
        </div>


</div>
<div id="method_getObjectProperties" class="method item">
    <h3 class="name"><code>getObjectProperties</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>object</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l764"><code>..&#x2F;src&#x2F;core.js:764</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns the public properties of one object and the type (not the values)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">object</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>returns object with attribute name and its type</p>

            </div>
        </div>


</div>
<div id="method_getScript" class="method item">
    <h3 class="name"><code>getScript</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l861"><code>..&#x2F;src&#x2F;core.js:861</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns an script context using the script name (not the node name), usefull to pass data between scripts.</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>the name of the script according to the Script component.</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>the context of the script.</p>

            </div>
        </div>


</div>
<div id="method_isClassComponent" class="method item">
    <h3 class="name"><code>isClassComponent</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>comp</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Boolean</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l191"><code>..&#x2F;src&#x2F;core.js:191</code></a>
        </p>



    </div>

    <div class="description">
        <p>Tells you if one class is a registered component class</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">comp</code>
                        <span class="type">ComponentClass</span>


                    <div class="param-description">
                        <p>component class to evaluate</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Boolean</span>:
                    <p>true if the component class is registered</p>

            </div>
        </div>


</div>
<div id="method_nextFrame" class="method item">
    <h3 class="name"><code>nextFrame</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Promise</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l332"><code>..&#x2F;src&#x2F;core.js:332</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns a Promise that will be fulfilled when the next frame is rendered</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Promise</span>:
            </div>
        </div>


</div>
<div id="method_registerComponent" class="method item">
    <h3 class="name"><code>registerComponent</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>component</code>
                </li>
                <li class="arg">
                        <code>old_classname</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l116"><code>..&#x2F;src&#x2F;core.js:116</code></a>
        </p>



    </div>

    <div class="description">
        <p>Register a component (or several) so it is listed when searching for new components to attach</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">component</code>
                        <span class="type">Component</span>


                    <div class="param-description">
                        <p>component class to register</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">old_classname</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>[optional] the name of the component that this class replaces (in case you are renaming it)</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_registerMaterialClass" class="method item">
    <h3 class="name"><code>registerMaterialClass</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>comp</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l838"><code>..&#x2F;src&#x2F;core.js:838</code></a>
        </p>



    </div>

    <div class="description">
        <p>Register a Material class so it is listed when searching for new materials to attach</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">comp</code>
                        <span class="type">ComponentClass</span>


                    <div class="param-description">
                        <p>component class to register</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_registerResourceClass" class="method item">
    <h3 class="name"><code>registerResourceClass</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>c</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l274"><code>..&#x2F;src&#x2F;core.js:274</code></a>
        </p>



    </div>

    <div class="description">
        <p>Register a resource class so we know which classes could be use as resources</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">c</code>
                        <span class="type">ComponentClass</span>


                    <div class="param-description">
                        <p>component class to register</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_replaceComponentClass" class="method item">
    <h3 class="name"><code>replaceComponentClass</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>scene</code>
                </li>
                <li class="arg">
                        <code>old_class_name</code>
                </li>
                <li class="arg">
                        <code>new_class_name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Number</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l204"><code>..&#x2F;src&#x2F;core.js:204</code></a>
        </p>



    </div>

    <div class="description">
        <p>Replaces all components of one class in the scene with components of another class</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">scene</code>
                        <span class="type">Scene</span>


                    <div class="param-description">
                        <p>where to apply the replace</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">old_class_name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>name of the class to be replaced</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">new_class_name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>name of the class that will be used instead</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Number</span>:
                    <p>the number of components replaced</p>

            </div>
        </div>


</div>
<div id="method_reset" class="method item">
    <h3 class="name"><code>reset</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l897"><code>..&#x2F;src&#x2F;core.js:897</code></a>
        </p>



    </div>

    <div class="description">
        <p>clears the global scene and the resources manager</p>

    </div>




</div>
<div id="method_safeCall" class="method item">
    <h3 class="name"><code>safeCall</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>callback</code>
                </li>
                <li class="arg">
                        <code>params</code>
                </li>
                <li class="arg">
                        <code>instance</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l346"><code>..&#x2F;src&#x2F;core.js:346</code></a>
        </p>



    </div>

    <div class="description">
        <p>Is a wrapper for callbacks that throws an LS &quot;exception&quot; in case something goes wrong (needed to catch the error from the system and editor)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">callback</code>
                        <span class="type">Function</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">params</code>
                        <span class="type">Array</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">instance</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_setInterval" class="method item">
    <h3 class="name"><code>setInterval</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>callback</code>
                </li>
                <li class="arg">
                        <code>time</code>
                </li>
                <li class="arg">
                        <code>timer_id</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l397"><code>..&#x2F;src&#x2F;core.js:397</code></a>
        </p>



    </div>

    <div class="description">
        <p>Is a wrapper for setInterval that throws an LS &quot;code_error&quot; in case something goes wrong (needed to catch the error from the system)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">callback</code>
                        <span class="type">Function</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">time</code>
                        <span class="type">Number</span>


                    <div class="param-description">
                        <p>in ms</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">timer_id</code>
                        <span class="type">Number</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_setTimeout" class="method item">
    <h3 class="name"><code>setTimeout</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>callback</code>
                </li>
                <li class="arg">
                        <code>time</code>
                </li>
                <li class="arg">
                        <code>timer_id</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l375"><code>..&#x2F;src&#x2F;core.js:375</code></a>
        </p>



    </div>

    <div class="description">
        <p>Is a wrapper for setTimeout that throws an LS &quot;code_error&quot; in case something goes wrong (needed to catch the error from the system)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">callback</code>
                        <span class="type">Function</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">time</code>
                        <span class="type">Number</span>


                    <div class="param-description">
                        <p>in ms</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">timer_id</code>
                        <span class="type">Number</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_sleep" class="method item">
    <h3 class="name"><code>sleep</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>ms</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Promise</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l322"><code>..&#x2F;src&#x2F;core.js:322</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns a Promise that will be fulfilled once the time has passed</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">ms</code>
                        <span class="type">Number</span>


                    <div class="param-description">
                        <p>time in milliseconds</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Promise</span>:
            </div>
        </div>


</div>
<div id="method_unregisterComponent" class="method item">
    <h3 class="name"><code>unregisterComponent</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l176"><code>..&#x2F;src&#x2F;core.js:176</code></a>
        </p>



    </div>

    <div class="description">
        <p>Unregisters a component from the system (although existing instances are kept in the scene)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>the name of the component to unregister</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_validateName" class="method item">
    <h3 class="name"><code>validateName</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Boolean</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l88"><code>..&#x2F;src&#x2F;core.js:88</code></a>
        </p>



    </div>

    <div class="description">
        <p>validates name string to ensure there is no forbidden characters
valid characters are letters, numbers, spaces, dash, underscore and dot</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Boolean</span>:
            </div>
        </div>


</div>
            </div>

            <div id="properties" class="api-class-tabpanel">
                <h2 class="off-left">Properties</h2>

<div id="property_Components" class="property item">
    <h3 class="name"><code>Components</code></h3>
    <span class="type">Object</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l44"><code>..&#x2F;src&#x2F;core.js:44</code></a>
        </p>


    </div>

    <div class="description">
        <p>Contains all the registered components</p>

    </div>

        <p><strong>Default:</strong> {}</p>


</div>
<div id="property_MaterialClasses" class="property item">
    <h3 class="name"><code>MaterialClasses</code></h3>
    <span class="type">Object</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_core.js.html#l53"><code>..&#x2F;src&#x2F;core.js:53</code></a>
        </p>


    </div>

    <div class="description">
        <p>Contains all the registered material classes</p>

    </div>

        <p><strong>Default:</strong> {}</p>


</div>
            </div>


    </div>
</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>
